<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<script type="text/javascript">
	function redirectCadastroUsuario() {
		location = "realizarCadastros.do?metodo=redirecionarCadastroUsuario";
	} 
</script>

<div>
	<html:form action="realizarLogin.do" method="post" styleId="realizarLoginForm">
		<html:hidden property="metodo" value="login" />
		
			<c:if test="${isLoginIncorreto}">
				<center>
					<div>
						<label>Login ou senha incorretos!</label>
					</div>
				</center>
			</c:if>
			<div id="login">
				<table border="0">
					<tr>
						<td colspan="2" align="center">Login</td>
					</tr>
			
					<TR>
						<TD>Usuário</TD>
						<TD><html:text property="login"></html:text></TD>
	
					</TR>
					<TR>
						<TD>Senha</TD>
						<TD><html:password property="senha"></html:password></TD>
					</TR>
				</table>
			
				<!-- BOTOES DE ACAO -->
				<html:submit styleId="Logar" value="Login" onclick="document.realizarLoginForm.metodo.value='logar'"></html:submit>
				<input type="button" value="Cadastrar Usuário" onclick="redirectCadastroUsuario();"/>
			</div>
		
	</html:form>
</div>